home *** CD-ROM | disk | FTP | other *** search
- * TJGRAFIX *
-
-
- Copyright (c), 1989 by
- Damn Fine Software Solutions
- PO Box 2073
- So. Londonderry, VT 05155-2073
-
- Version 1.0 written by Tab Julius (CIS id: 72037,3662).
-
- FOR PERSONAL AND PRIVATE USE ONLY. USERS WISHING TO USE IT
- FOR COMMERCIAL APPLICATIONS MUST FULLY REGISTER ($30) THE
- PRODUCT. SEE THIS DOCUMENT AND FILE REGISTER.TJG FOR MORE
- INFORMATION. THIS SOFTWARE MAY ONLY BE DISTRIBUTED IN ITS
- ENTIRETY. FOR QUESTIONS AND INFORMATION, CONTACT THE ADDRESS
- ABOVE OR SEND EMAIL TO CIS ID: 72037,3662.
-
-
-
- The following is the interface for TJGrafix:
-
-
-
-
- Unit TJGrafix;
-
- Interface
- Uses Dos,Graph;
-
- var
- Use_BIOS_with_TJGrafix :boolean;
-
-
-
-
-
- Procedure Enter_256_Color_Mode;
- Procedure Set_Cursor_Location(row,col :byte);
- Procedure Find_Cursor(var row,col :byte);
- Function Character_Under_Cursor :byte;
- Procedure Put_At_Cursor_in_256(character,fore,back,how_many :byte);
- Procedure Put_String_in_256(row,col,fore,back :word; wording :string);
- Procedure Set_Pixel_BIOS(horiz,vert,color :word);
- Procedure Get_Pixel_BIOS(horiz,vert:word; var color :word);
- Procedure Set_Pixel(horiz,vert :word; color :word);
- Procedure Get_Pixel(horiz,vert :word; var color :word);
- Procedure Horiz_Bar(horiz,vert,length,color :word);
- Procedure Vert_Bar(horiz,vert,length,color :word);
- Procedure Box(l_col,l_row,r_col,r_row,color :word);
- Procedure Solid_Box(l_col,l_row,r_col,r_row,color :word);
- Procedure Ribbon_Box(l_col,l_row,r_col,r_row,initial_color,spacing :word);
- Procedure Vert_Ribbon_Box(l_col,l_row,r_col,r_row,initial_color,spacing :word);
- Procedure Grow_Ribbon_Box_Light(horiz,vert,radius,initial_color :word);
- Procedure Grow_Ribbon_Box_Dark(horiz,vert,radius,initial_color :word);
- Procedure Shrink_Ribbon_Box_Light(horiz,vert,radius,initial_color :word);
- Procedure Shrink_Ribbon_Box_Dark(horiz,vert,radius,initial_color :word);
- Procedure Shrink_Solid_Box(horiz,vert,radius,color :word);
- Procedure Dissolve_Box_Into_Color(l_horiz,l_vert,r_horiz,r_vert,color :word);
-
-
- ================================
- Conventions:
- In get/set pixel commands: horiz & vert are the location of the
- pixel, color is the color to set (or value returned).
-
- In horiz/vert bars: horiz & vert are the starting point, length
- is the length of the bar.
-
- In box stuff: l_col,l_row,r_col,r_row refer to the upper left
- location and the bottom right location. It probably should
- have been called l_horiz,l_vert, but, hey.
-
- In fancier box stuff: initial_color is the color that the draw
- routines begin with, increasing it's value with Spacing, or
- changing it darker or lighter depending on the routine. With
- Shrink and Grow boxes, specify the center of the box, and the
- radius to which it will grow.
-
- In text stuff, fore and back are foreground and background colors
- of the character value (it's ord) or the string if placing a
- string. You will notice that row comes before col when
- specifying text locations. This is actually Gods will when
- declaring text locations, though much of America seems to be
- preferring it the other way 'round.
-
-
- USING THE TPU: It is not necessary to invoke Borland's Initgraph,
- though we usually do, because it provides a convenient way of
- checking the graphics driver. For that reason, you might prefer
- to enter Initgraph, if everything is OK and the graphics equipment
- is a VGA,MCGA, or EGA that does the big 256, then use the
- Enter_256_Color_Mode. Note that other Borland Graph unit routines
- will not work at this point, however you can use CloseGraph to get
- you back out. Although there is no "clear screen" command, you
- will find that re-using Enter_256_Color_Mode will do the trick.
-
-
-
- How much?
-
- o This TPU is available as shareware for the reasonable price of
- a dollar.
-
- o However, DFSS offers full registration which will provide you
- with the following, for a $30 fee:
-
- o Source code to the .TPU (which you would need if
- America has to recompile for Turbo Pascal version 6).
-
- o Extended documention, customer support.
-
- o The 5x8 font, which is used in the demo, but not
- included in this .TPU.
-
- o Any future releases for only the cost of the media
- plus postage and handling. Future releases will
- not be available via CompuServe.
-
- o Permission to use this software in commercial
- applications.
-
-
- What does it do?
-
- o It provides routines to let you take advantage of the 256-color
- capabilities of the IBM MCGA,EGA, and VGA within your programs
- with minimal difficulty.
-
- Specifically, this version sets pixels in any of the 256 colors
- (keep in mind this is 320x200 mode), determines pixel value, moves
- the cursor, finds the cursor, finds the character under the cursor,
- places a string at the cursor location, puts a 5x8 string down (if
- you have fully registered the product), draws horizontal and vertical
- lines, draws boxes, draws filled-in (solid) boxes, draws ribbon boxes
- (a better name would have been rainbox boxes), grows or shrinks boxes
- and finally dissolves boxes to your choice of color.
-
- Also included is 256.exe which is a helpful little program to use
- to determine the value (17-247) of the colors you wish to use.
-
- A demo program is included which first displays the DFSS logo (made
- with TJGrafix) and then some demonstrations of rainbow boxes, growing
- and shrinking boxes, and dissolving boxes.
-
-
- o Normally TJGrafix writes directly to the screen, but if you want to
- use bios calls, USE_BIOS_WITH_TJGRAFIX is a boolean variable that
- controls the technique used. Normally false, set it as you wish.
- As usual, the tradeoff between direct-writes and a "well behaved"
- program is speed. Tragically so when you are working at the pixel
- level.
-
- o Note on the demo: The demo program itself does not check to see if
- you have an MCGA,EGA, or VGA. It just assumes you do. No promises
- are made as to what will happen if you don't.
-
-
-
- WHEN RUNNING THE DEMO:
-
- Format: TJDEMO [/B]
-
- o Make sure you have the appropriate .BGI driver in your default
- directory (i.e.: EGAVGA.BGI).
-
- o Use /B or /b as a command switch to force BIOS calls if preferred.
- This will make it considerably slower, though.
-
- - The DFSS logo will run first.
- - One staggered-color box will appear. Press any key.
- - A more-staggered-color box will appear. Press any key.
- - A range of colors will fill the screen. Press any key.
- - Ribbon boxes will appear and move internally. If you have an
- 80286 machine this appears to be fairly fluid movement. If you
- are running a model 30 or using BIOS calls it's not quite the
- same effect, though interesting. Press any key when they stop.
- - Shrink and grow light/dark demos appear. Press any key after each.
- - A solid orangish-colored box appears. Press any key.
- - The box will dissolve into various solid-colored boxes. After the
- last one, the screen will clear with a final message.
-
-
- As mentioned earlier, 256.EXE is included. This will draw the range
- of colors from 17 to 247. The colors outside this range are either
- your normal 16 colors (under 17) or black (at least on our equipment).
-
- To use, run program (sorry, only direct video writing used there).
- Press ESC at any time to leave. Press space bar to advance a color
- and see the associated value.
- *taj